<template>
  <div class='modal-main'>
    <div class="modal-fixedTitle clearfix" id="gd-airconditioner-filter">
      <comCarInfoWrapper v-if="query_vinCode" :vin="query_vinCode"></comCarInfoWrapper>
    </div>
    <div class='modal-content'>
      <div class="fg-carDetailBox" v-for="(oneDetail, detailIndex) in details" :key="detailIndex">
        <div class="fg-carDetailBox-item">
          <div class="title">{{oneDetail.description}}</div>
          <img style="width:100%;" :src="oneImage.small" alt="" v-for="(oneImage, imageIndex) in oneDetail.images" :key="imageIndex" @click="on_image_click(oneImage)">
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import comCarInfoWrapper from '@/components/com-carInfo-wrapper';
export default {
  name: '',
  data() {
    return {
      query_vinCode: '', //VIN码
      query_locationId: 0, //位置ID
      details: [], //文章详情
      simpleVinInfo_instance: null, //组件实例
    }
  },
  created() {
    this.query_vinCode = this.$route.query.vin || '';
    this.query_locationId = this.$route.query.locid || 0;

    this.initPage();
  },
  methods: {
    async initPage() {
      try {
        const res = await this.$imServive({
          url: "/Auto/GetAirFilterLocation",
          data: {
            locationId: this.query_locationId,
            vinCode: this.query_vinCode,
          },
        });
        this.details = res.details;
      } catch (error) {
        console.log('我错了', error);
      }
    },
    on_image_click(oneImage) {
    },
  },
  components: {
    comCarInfoWrapper
  }
}
</script>

<style scpoed>
.modal-main {
  width: 100%;
  background-color: #fff;
  bottom: 0;
  left: 0;
  border-radius: 0.21333333333333335rem 0.21333333333333335rem 0 0;
  overflow: hidden;
}
.modal-title {
  position: relative;
  height: 1.28rem;
  padding: 0.24rem 0.32rem;
  display: flex;
  align-items: center;
  border-bottom: 0.013333333333333334rem solid #e8e8e8;
  width: 100%;
  box-sizing: border-box;
}
.modal-title .title {
  width: auto;
  font-size: 0.4rem;
  text-align: center;
  color: #282828;
  display: block;
}
.modal-title .imgicon {
  position: absolute;
  right: 0.32rem;
  top: 50%;
  z-index: 666;
  transform: translateY(-50%);
  width: 0.4rem;
  height: 0.4rem;
}
.modal-content {
  flex: 1;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(100vh - 2.2933333333333334rem);
}
.modal-content-scroll {
  margin-left: 0.4266666666666667rem;
  margin-right: 0.4266666666666667rem;
}
.modal-button {
  font-size: 0.64rem;
  width: 100%;
  height: 1.3333333333333333rem;
  line-height: 1.3333333333333333rem;
  display: flex;
  flex-direction: row;
  border-top: 0.02666666666666667rem solid rgba(7, 17, 27, 0.1);
}
.modal-cancel,
.modal-confirm {
  flex: 1;
  height: 1.3333333333333333rem;
  line-height: 1.3333333333333333rem;
  text-align: center;
}
.modal-cancel {
  border-right: 0.02666666666666667rem solid rgba(7, 17, 27, 0.1);
}
.clearfix:after {
  content: "";
  /*设置内容为空*/
  height: 0;
  /*高度为0*/
  line-height: 0;
  /*行高为0*/
  display: block;
  /*将文本转为块级元素*/
  visibility: hidden;
  /*将元素隐藏*/
  clear: both;
  /*清除浮动*/
}
.clearfix {
  zoom: 1;
  /*为了兼容IE*/
}
/* 顶部一层logo */
.fg-carInfoBox {
  padding: 0.26666666666666666rem 0.28rem;
  width: 100%;
  float: left;
  clear: left;
  box-sizing: border-box;
  background: #f6f6f6;
}
.fg-carInfoBox > view {
  width: 100%;
  float: left;
  clear: left;
  display: flex;
  align-items: center;
}
.fg-carInfoBox > view > view.dtbox {
  width: 1.0666666666666667rem;
  height: 1.0666666666666667rem;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  float: left;
  clear: left;
  background: #fff;
}
.dtbox > image {
  width: 1.0666666666666667rem;
  height: 1.0666666666666667rem;
  border-radius: 50%;
}
.fg-carInfoBox > view > view.ddbox {
  height: auto;
  float: right;
  clear: none;
  margin-left: 0.24rem;
}
.vinCoda {
  width: auto;
  float: left;
  clear: none;
  color: #acacac;
  font-size: 0.32rem;
}
.vinCoda > text {
  width: auto;
  height: auto;
  font-size: 0.32rem;
  font-weight: normal;
  line-height: 0.64rem;
  text-align: left;
  color: #666;
  float: left;
  clear: left;
}
.fg-carDetailBox {
  padding: 0.32rem;
}
.fg-carDetailBox-item {
  width: 100%;
  height: auto;
  display: block;
  float: left;
  clear: left;
}
.fg-carDetailBox-item image {
  width: 100%;
  height: 100%;
  display: block;
  float: left;
  clear: left;
  margin: 0.08rem 0;
}
</style>
